package com.solver.mapper;

import com.solver.entity.QuestionDifficulty;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuestionDifficultyMapper {

    void insertBatch(List<QuestionDifficulty> difficulties);

    @Delete("delete from question_difficulty where question_id = #{id}")
    void deleteByQuestionId(Long id);

    void deleteByQuestionIds(List<Long> questionIds);

    @Select("select * from question_difficulty where question_id = #{questionId}")
    List<QuestionDifficulty> getDifficutiesByQuestionId(Long questionId);
}
